Image encoder, image encoding method, image decoder, and image decoding method

ABSTRACT

In an image encoder, a first quantization section which is selected when normal image quality is required performs quantization by dividing a wavelet transformation coefficient by a quantization step size and by thereafter rounding down a fraction thereof. On the other side, a second quantization section which is selected when high image quality is required performs quantization by dividing a wavelet transformation coeffient by a quantization step size, by adding 0.5 to the dividing result, and by thereafter rounding down a fraction thereof. Therefore, the width of a dead zone where coefficients are quantized to a value of 0 is narrower than that in the first quantization section, and higher image quality is obtained accordingly.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image encoder and a method thereofin which an input image is compressed and encoded by wavelettransformation, quantization, and entropy encoding to generate anencoded code stream, and an image decoder and a method thereof in whichthe generated code stream is decoded to reconstruct the input image,like the JPEG 2000 scheme.

This application claims priority of Japanese Patent Application NO.2004-046713, filed on Feb. 23, 2004, the entirety of which isincorporated by reference herein.

2. Description of Related Art

One of conventional typical image compression schemes is the JPEG (JointPhotographic Experts Group) scheme standardized by the ISO(International Standards Organization). This scheme utilizes discretecosine transformation (DCT). When a relatively high bit number isassigned, excellent encoded and decoded images are obtained, as isknown. However, if the encoding bit number is lowered to a certaindegree or much lower, block deformation inherent to the DCT appears soconspicuously that subjective deterioration of image quality becomesconspicuous.

Meanwhile, recent developments have been becoming active about a schemein which an image is divided into plural bands by a filter combininghigh-pass and low-pass filters, called a filter bank, and encoding isperformed for every band. In those developments, wavelet transformationencoding has been considered as new prevailing technology which willtake over the DCT because the wavelet transformation encoding does nothave the drawback of block deformation appearing conspicuously at a highcompression rate like in the DCT.

The JPEG 2000 scheme has been completely internationally standardizedsince January 2001, and employs a system which combines the wavelettransformation, quantization and highly efficient entropy encoding (bitmodeling and arithmetic encoding in units of bit planes.) Compared withearlier JPEG schemes, the encoding efficiency has been improved actually(see Japanese Patent Application Laid-Open Publication No. 2002-27403.)These international standards define specifications concerning decodersbut allows free design concerning encoders.

However, the quantization means in the JPEG 2000 scheme aims primarilyat a high compression rate. There hence has been a problem thatexcellent performance cannot always be achieved in case where ahigh-quality image is required at a low compression rate.

SUMMARY OF THE INVENTION

The present invention has been proposed in view of current situations asdescribed above, and has an object of providing an image encoder and amethod thereof capable of performing a quantization processingcorresponding to required image quality, and an image decoder and amethod thereof capable of decoding a generated encoded code stream toreconstruct an input image.

To achieve the above object, an image encoder according to the presentinvention comprises: a filtering means which hierarchically performs afiltering processing on an input image, to generate plural sub-bands; aquantization means which quantizes coefficients in each of the sub-bandsafter the filtering processing; a code block generation means whichdivides the sub-bands, to generate code blocks each having apredetermined size; a bit plane generation means which generates bitplanes from a most significant bit to a least significant bit, for everyone of the code blocks; an encoding means which arithmetically encodes acoding pass generated for every one of the bit planes; and a formatmeans which performs formatting by adding a header to an arithmetic codegenerated by the encoding means, to generate an encoded code stream,wherein the quantization means varies the width of a dead zone incorrespondence with required image quality, the dead zone being aquantization zone where the coefficients are quantized to a value of 0,and the format means sets a predetermined parameter included in theheader, the predetermined parameter being to be used when inversequantization corresponding to the quantization of the quantization meansis performed.

To achieve also the above object, an image encoding method according tothe present invention comprises: a filtering step of hierarchicallyperforming a filtering processing on an input image, to generate pluralsub-bands; a quantization step of quantizing coefficients in each of thesub-bands after the filtering processing; a code block generation stepof dividing the sub-bands, to generate code blocks each having apredetermined size; a bit plane generation step of generating bit planesfrom a most significant bit to a least significant bit, for every one ofthe code blocks; an encoding step of arithmetically encoding a codingpass generated for every one of the bit planes; and a format step ofperforming formatting by adding a header to an arithmetic code generatedby the encoding step, to generate an encoded code stream, wherein in thequantization step, the width of a dead zone is varied in correspondencewith required image quality, the dead zone being a quantization zonewhere the coefficients are quantized to a value of 0, and in the formatstep, a predetermined parameter is included in the header, thepredetermined parameter being to be used when inverse quantizationcorresponding to the quantization of the quantization step is performed.

In the image encoder and image encoding method as described above, whenquantizing each coefficient in each sub-band after filtering processing,the width of the dead zone is varied in correspondence with imagequality required. In addition, the predetermined parameter used toperform inverse quantization corresponding to the quantization isincluded in the header of the encoded code stream.

To achieve also the above object, an image decoder according to thepresent invention reconstructs an input image by decoding an encodedcode stream which is generated by the above-described image encodingprocessing, the image decoder comprising: an inverse format means whichdecomposes the encoded code stream into at least the arithmetic code andthe predetermined parameter; a decoding means which decodes thearithmetic code; an encoded-pass decoding means which decodes theencoded pass for every one of the bit planes, to reconstruct the bitplanes from the most significant bit to the least significant bit; acode block reconstruction means which reconstructs the code bocks, basedon the bit planes from the most significant bit to the least significantbit; a sub-band generation means which collects the code blocks togenerate the sub-bands; an inverse quantization means which inverselyquantizes a quantization coefficient for every one of the sub-bands,with use of the predetermined parameter; and a filtering means whichperforms hierarchically a filtering processing on the sub-bands, toreconstruct the input image.

To achieve also the above object, in an image decoding method accordingto the present invention, an input image is reconstructed by decoding anencoded code stream which is generated by the above-described imageencoding processing, the image decoding method comprising: an inverseformat step of decomposing the encoded code stream into at least thearithmetic code and the predetermined parameter; a decoding step ofdecoding the arithmetic code; an encoded-pass decoding step of decodingthe encoded pass for every one of the bit planes, to reconstruct the bitplanes from the most significant bit to the least significant bit; acode block reconstruction step of reconstructing the code bocks, basedon the bit planes from the most significant bit to the least significantbit; a sub-band generation step of collecting the code blocks togenerate the sub-bands; an inverse quantization step of inverselyquantizing a quantization coefficient for every one of the sub-bands,with use of the predetermined parameter; and a filtering step ofperforming hierarchically a filtering processing on the sub-bands, toreconstruct the input image.

In the image decoder and image decoding method as described above, thequantization coefficients for every sub-band are inversely quantizedwith use of the predetermined parameter included in the encoded codestream.

In the image encoder and image encoding method, and the image decoderand image decoding method according to the present invention, whenquantizing each coefficient in each sub-band after filtering processing,the width of the dead zone is varied in correspondence with imagequality required. In addition, the predetermined parameter used toperform inverse quantization corresponding to the quantization isincluded in the encoded code stream. Thus, the image quality of adecoded image can be varied. Particularly, when high quality isrequired, the width of the dead zone is narrowed to eliminate loss ofdetails caused by quantization, and hence, subjective image quality canbe improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing a schematic configuration of an imageencoder according to an embodiment;

FIG. 2 is a diagram for explaining sub-bands when wavelet transformationis effected three times;

FIGS. 3A and 3B are views for explaining sub-bands when an actual imageis subjected to wavelet transformation;

FIG. 4 is a diagram for explaining code blocks and sub-bands;

FIGS. 5A to 5C are views for explaining bit planes where FIG. 5A shows aquantization coefficient set consisting of total sixteen coefficients,FIG. 5B shows bit planes showing absolute values of coefficients, andFIG. 5C shows a bit plane of a code;

FIG. 6 is a chart showing a processing procedure of coding passes in acode block;

FIG. 7 is a diagram for explaining scanning order of coefficients in acode block;

FIG. 8 is a graph showing a quantization characteristic of a firstquantization section in the image encoder;

FIG. 9 is a graph showing a quantization characteristic of a secondquantization section in the image encoder;

FIG. 10 is a table concerning Sqcd and Sqcc parameters;

FIG. 11 is a table including a value of parameter r added to the tableof FIG. 10;

FIG. 12 is a diagram showing a schematic configuration of an imageencoder for adjusting a total code amount to a target code amount whenquantization is performed by the second quantization section 13 b;

FIG. 13 is a diagram for explaining a schematic configuration of animage decoder according to the embodiment; and

FIG. 14 is a diagram showing a schematic configuration of an adaptiveinverse quantization section in the image decoder.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, a specific embodiment to which the present invention isapplied will be described in more details with reference to thedrawings. In the present embodiment, the present invention is applied toan image encoder and a method thereof in which an input image iscompressed and encoded according to the JPEG 2000 scheme, to generate anencoded code stream, and an image decoder and a method thereof in whichthe encoded code stream generated is decoded to reconstruct an inputimage.

(1) Structure and Operation of the Image Encoder

FIG. 1 shows a schematic structure of the image encoder in the presentembodiment. As shown in FIG. 1, the image encoder 10 is constituted by aDC level shift section 11, wavelet transformation section 12,quantization section 13, code blocking section 14, bit modeling section16, arithmetic encoding section 17, rate control section 18, and formatsection 19. The quantization section 13 includes a first quantizationsection 13 a selected when normal image quality is required, and asecond quantization section 13 b selected when high image quality isrequired. The bit modeling section 16 and the arithmetic encodingsection 17 constitute together an EBCOT (Embedded Coding with OptimizedTruncation) section 15.

The DC level shift section 11 effects level-shifting on an originalsignal, in order to perform efficiently wavelet transformation in thewavelet transformation section 12 in a rear stage and improve thecompression rate. In principle, an RGB signal has a positive value(i.e., an integer without plus or minus symbol), and therefore,level-shifting is executed to reduce the dynamic range of the originalsignal to half. Then, the compression efficiency can be improved. Incontrast, color difference signals such as Cb and Cr of a YCbCr signalhave both positive and negative integers. Therefore, level-shifting isnot carried out.

The wavelet transformation section 12 is normally realized by a filterbank which includes low-pass and high-pass filters. Since a digitalfilter has an impulse response having plural tap lengths (filtercoefficients), it is necessary to buffer, in advance, a part of an inputimage that is enough to execute filtering although this is omitted fromFIG. 1 to help simple understanding.

The DC level shift section 11 is inputted with an image signal D10 of aleast necessary volume for filtering, and executes level-shifting asdescribed above. Further, the wavelet transformation section 12 performsa filtering processing in which wavelet transformation is effected onthe image signal D11 after the DC level shifting. This section 12 thusgenerates a wavelet transformation coefficient set D12, and supplies thegenerated wavelet transformation coefficient set D12 to the quantizationsection 13.

In this wavelet transformation, normally, low-pass components arerepeatedly transformed as shown in FIG. 2 because energy of an imageconcentrates mainly on low-pass components. This can be understoodapparently from FIGS. 3A and 3B in which sub-bands are formed asillustrated therein as the division level shifts from the division level1 in FIG. 3A to the division level 3 shown in FIG. 3B. Meanwhile, thedivision level of wavelet transformation in FIG. 2 is three, and totalten sub-bands are formed as a result. In FIG. 2, L and H denoterespectively low-pass and high-pass bands, and the numeral followingeach symbol indicates a division level. That is, for example, LH-1expresses a sub-band which has a low-pass component in the horizontaldirection as well as a high-pass component in the vertical direction inthe division level 1.

The quantization section 13 performs irreversible compression on thewavelet transformation coefficient set D12 supplied from the wavelettransformation section 12, and supplies a quantization coeffecient setD13 to the code blocking section 14. The quantization means may employscalar quantization in which the wavelet transformation coefficient setD12 is divided by a quantization step size.

Because of the standard of the JPEG 2000 scheme, compliant use of thescalar quantization is automatically determined when a 9×7 wavelettransformation filter is used in case of performing the irreversiblecompression. On the other side, when a reversible 5×3 wavelettransformation filter is used, quantization is not executed but codeamount control is carried out by the rate control section 18 describedlater. Thus, the quantization section 13 shown in FIG. 1 operatesactually when the irreversible 9×7 wavelet transformation filter isused. The description below, however, will be made on interpretationthat scalar quantization is carried out with a quantization step size of1 when the reversible 5×3 wavelet transformation filter is used. Thequantization step size in the present embodiment is defined by both ofthe quantization step size in the scalar quantization and fractions ofbit planes or encoding passes as will be described later.

As described above, the quantization section 13 includes the firstquantization section 13 a selected when normal image quality isrequired, and the second quantization section 13 b selected when highimage quality is required. A quantization processing is peformedcorresponding to each of the image qualities. These first and secondquantization sections 13 a and 13 b will be described later in moredetails concerning their operation.

The code blocking section 14 divides the quantization coefficient setD13 supplied from the quantization section 13, into code blocks whichare processing units in entropy encoding and have a predetermined size.FIG. 4 shows the positional relationship between the code blocks in asub-band. Normally, for example, code blocks each having a size of 64×64are generated in all sub-bands after the division. Therefore, if asub-band has a size of 640×320, code blocks of 64×64 are generated in amatrix of ten columns in the horizontal direction and five rows in thevertically direction. Total fifty code blocks are thus generated. Thecode blocking section 14 supplies the EBCOT section 15 with aquantization coefficient set D14 for every code block. Further, encodingprocessing in a rear stage is carried out for every code block.

The EBCOT section 15 explodes the quantization coefficient set D14 onbit planes for every code block, and performs bit-modeling andarithmetic encoding in units of bit planes. Details of the EBCOT aredescribed in, for example, a document “ISO/IEC 15444-1, Informationtechnology-JPEG 2000, Part 1: Core coding system” and the like.

Before making an explanation to the EBCOT, the concept of bit plane willbe described first with reference to FIGS. 5A to 5C. FIG. 5A assumes aquantization coeffient set which consists of total sixteen coefficients,i.e., vertical four coefficients by horizontal four coefficients. Thegreatest absolute value of these coefficients is “13” or “1101”expressed in binary. Therefore, the absolute value of the coefficient isconfigured by four bit planes as shown in FIG. 5B. Every coefficient bitin each bit plane takes “0” or “1”. On the other side, the only onenegative value among the codes of the quantization coefficients is “−6”,and every one of other values takes “0” or a positive value. Therefore,the bit plane of the code is expressed as shown in FIG. 5C.

The EBCOT is an means which encodes an image while measuring samplestatic of coefficient bits in the block for every block having apredetermined size. Quantization coefficients are subjected to entropyencoding in units of code blocks. Code blocks are encoded in a directionfrom the most significant bit (MSB) to the least significant bit (LSB),independently for every bit plane. The vertical and horizontal sizes ofeach code block belong to powers of 2 from 4 to 256. In general, sizesof 32×32, 64×64, 128×32, or the like are used. The quantizationcoefficients each are expressed as a number in binary with an n-bitcode, and respectively express bits from the least significant bit (LSB)to the most significant bit (MSB), corresponding to bit 0 to bit t(n−2).The remaining 1 bit is a code. Encoding of code blocks is carried outwith use of three kinds of encoding pass (a) to (c), as described below,in order from the side of the bit plane in the most significant bit(MSB).

(a) Significance Propagation Pass

(b) Magnitude Refinement Pass

(c) Clean Up Pass

FIG. 6 shows the order in which the three passes are used. As shown inFIG. 6, the bit plane (n−2) (MSB) is encoded first with the Clean UpPass (hereinafter referred to as CU pass). Subsequently, descending tothe least significant bit (LSB) side, each bit lane is encoded with theSignificance Propagation Pass (hereinafter referred to as SP pass), theMagnitude Refinement Pass (hereinafter referred to as MR pass), and theCU pass used in this order.

In actual cases, however, there is a description in the header, writingthat “1” appears for the first time in what number bit plane from themost significant bit (MSB). Bit planes each consisting only ofcoefficients of zeros (zero bit planes) are not encoded. In the EBCOT,encoding is performed by repeatedly using the three kinds of encodingpass in the order described above.

Scanning of coefficient bits will now be described with reference toFIG. 7. Each code block is divided into stripes for every four bits inheight. The stripes have a width equal to the width of the code block. Ascanning order is the order in which all coefficient bits in one codeblock are traced. In one code block, scanning is performed in the orderfrom an uppermost stripe to a lower stripe. In each stripe, scanning isperformed in the order from a left column to a right column. In eachcolumn, scanning is performed in the descending order. For each of theencoding passes, all coefficient bits in a code block are processed inthe scanning order.

The three encoding passes described above will now be described. Theforegoing document “ISO/IEC 15444-1, Information technology-JPEG 2000,Part 1: Core coding system” deals with each of the three encodingpasses.

(a) Significance Propagation Pass

With the SP pass which encodes a bit plane, a non-significantcoefficient bit as indicating that at least one coefficient bit near 8is significant is arithmetically encoded. Subsequently, if the encodedcoefficient bit has a value of “1”, positive or negative of the code isarithmetically encoded.

The term of “significance” means a state which an encoder has withrespect to each coefficient bit. The initial value of the “significance”is “0” expressing non-significance. The initial value varies to “1”expressing significance when “1” is encoded as a coefficient bit.Afterwards, “1” is maintained continuously. Therefore, the“significance” can also be a flag indicative of whether informationconcerning a valid figure number has already been encoded or not. If anSP pass is generated in a bit plane, no SP pass is generated followingbit planes.

(b) Magnitude Refinement Pass

With the MR pass which encodes a bit plane, a significant coefficientbit which is not encoded with the SP pass which also encodes a bit planeis arithmetically encoded.

(c) Clean Up Pass

With the CU pass which encodes a bit plane, a non-significantcoefficient bit which is not encoded with the SP pass which also encodesa bit plane is arithmetically encoded. If the encoded coefficient bithas a value of “1”, positive or negative of the code is arithmeticallyencoded.

In the arithmetic encoding with use of the above three encoding passes,ZC (Zero Coding), RLC (Run-Length Coding), SC (Sign Coding), and MR(Magnitude Refinement) are selectively used depending on cases, andthus, context of coefficients is selected. Further, symbols ofcoefficient bits and the selected context are encoded with use ofarithmetic codes called MQ coding. This MQ coding uses binary arithmeticcodes defined according to the JBIG2. For example, a document “ISO/IECFDIS 14492: Lossy/Lossless Coding of Bi-level images, March 2000”describes the MQ coding. According to the JPEG 2000 standard, there aretotal 19 kinds of context for all coding passes.

As described above, the bit modeling section 16 explodes thequantization coefficients D14 onto bit planes, for every code block, andprocesses coefficient bits with three coding passes, for every bitplane, thus to generate a symbol and a context D15 for every coefficientbit. Further, the arithmetic encoding section 17 arithmetically encodesthe symbol and context D15 for every coefficient bit, and supplies anarithmetic code D16 to the rate control section 18.

The rate control section 18 discards bit planes or coding passes fromthe least significant bit (LSB) side or selects bit planes or codingpasses from the most significant bit (MSB) side, in order that the totalcode amount should reach a target code amount and the image qualityafter decoding should be optimal. As a result, unnecessary bit planes orcoding passes are discarded, thereby achieving rate control. The ratecontrol section 18 supplies an arithmetic code string D17 resulting fromthe rate control to the format section 19.

This rate control is carried out only when the first quantizationsection 13 a is selected in the quantization section 13. Otherwise, ifthe second quantization section 13 b is selected in the quantizationsection 13, the rate control section 18 is bypassed, and the arithmeticcode D16 is directly supplied to the format section 19. A furtherdescription in this respect will be made later.

The format section 19 attaches various headers to the arithmetic codestring D17 supplied from the rate control section 18 or the arithmeticcode D16 supplied from the arithmetic encoding section 17, thereby toformat the string or the code in compliance with the JPEG 2000 standard.Then, the format section 19 outputs the formatted string or code as anencoded stream D18.

By thus utilizing wavelet transformation, quantization, and entropyencoding, the image encoder 10 according to the present embodiment iscapable of compressing/encoding an input image with high efficiency andoutputting the image in form of an encoded code stream.

(2) Applicable Part in an Image Encoder

Meanwhile, as described above, the quantization section 13 includes thefirst quantization section 13 a selected when normal image quality isrequired, and the second quantization section 13 b selected when highimage quality is required.

The first quantization section 13 a performs quantization correspondingto the quantization size Δ, on the wavelet transformation coefficientset D12 supplied from the wavelet transformation section 12.

The quantization step size Δ is given by the following expression (1) asthe E. 3 expression defined in the spec sheets of the JPEG 2000standard. In this expression (1), Δ_(b) indicates a quantization stepsize assigned to a sub-band b, and Rb indicates a dynamic range alsoassigned to the sub-band b. εb indicates a quantization exponentassigned also to the sub-band b, and μ_(b) indicates a quantizationmantissa assigned also to the sub-band b.Δ_(b)=2^(Rb−εb)(1+μ_(b)/2¹¹)  (1)

The first quantization section 13 a uses the quantization step sizeΔ_(b) obtained from the above expression (1), to calculate aquantization coefficient q_(b) (u, v) according to the expression (2)below. In the expression (2), dwt_(b) (u, v) indicates a wavelettransformation coefficient at the point expressed by (u, v). If the sign(x) takes x where x is positive as well as −x where x is negative. Thefloor (x) expresses a round-down processing for the integer value of x,e.g., floor (2.5)=2.q _(b)(u, v)=sign(dwt _(b)(u, v))×floor(|dwt _(b)(u, v)|/Δ_(b))  (2)

FIG. 8 shows the quantization characteristic of the first quantizationsection 13 a where the ordinate axis represents the wavelettransformation coefficient as well as the abscissa axis represents thequantization coefficient. As can be seen from FIG. 8, when the wavelettransformation coefficient dwt_(b)(u, v) is within a range of −Δ to +Δ,the quantization coefficient q_(b)(u, v) is 0. Thus, the quantizationzone in which the quantization coefficient q_(b)(u, v) is 0 is called adead zone. According to the JPEG 2000 standard, a dead zone of this kindis provided mainly for the purpose of improving the compression rate.That is, at a high compression rate, the quantization step size Δ is solarge that the wavelet transformation coefficient dwt_(b)(u, v) falls inthe dead zone shown in FIG. 8 with high possibility. Therefore, thequantization coefficient q_(b)(u, v) becomes 0 at a high percentage, andas a result, the compression rate in the entropy encoding can beimproved.

After the quantization coefficient set D13 is thus obtained by the firstquantization section 13 a, processings as described above are executedby the code blocking section 14, bit modeling section 16, and thearithmetic encoding section 17, thereby to obtain an arithmetic codeD16.

Thereafter, the rate control section 18 discards bit planes or codingpasses from the least significant bit (LSB) side or selects bit planesor coding passes from the most significant bit (MSB) side, as describedabove, in order that the total code amount should reach a target codeamount and the image quality after decoding should be optimal. As aresult, unnecessary bit planes or coding passes are discarded, thusachieving rate control. The discarding of n bit planes in the ratecontrol section 18 is equivalent to division of the quantizationcoefficient set by n-th power of 2. Therefore, if TBc (pieces of) bitplanes are discarded from a code block, the quantization step size Δ asa result of rate control is given by the following expression (3).Δ_(c)=Δ_(b)×2^(TBc)  (3)

Hence, the quantization coefficient q_(b)(u, v) as a result of ratecontrol is obtained from the following expression (4).q _(b)(u, v)=sign(dwt _(b)(u, v))×floor(|dwt _(b)(u, v)|/Δ_(c))  (4)

On the other side, the second quantization section 13 b uses thequantization step size Δ_(b) obtained by the expression (1) above, tocalculate the quantization coefficient q_(b)(u, v) according to theexpression (5) below.q _(b)(u, v)=sign(dwt _(b)(u, v))×floor(|dwt _(b)(u, v)|/Δ_(b)+0.5)  (5)

As shown by this expression (5), in the quantization performed by thesecond quantization section 13 b, the absolute value of the wavelettransformation coefficient dwt_(b)(u, v) is divided by the quantizationstep size Δ_(b) and is thereafter added with 0.5. In the quantizationachieved by this expression, a rounding processing is executed and thequantization characteristic thereof will be as shown in FIG. 9.

As is apparent from comparison between FIGS. 8 and 9, in thequantization in the second quantization section 13 b as shown in FIG. 9,the width of the dead zone is narrower than that in the firstquantization section 13 a shown in FIG. 8. As a result of this, thequantization coefficient q_(b)(u, v) takes 0 at a lower rate, andaccordingly, higher image quality can be achieved.

After the quantization coefficient set D13 is thus obtained by thesecond quantization section 13 b, processings as described previouslyare executed by the code blocking section 14, bit modeling section 16,and arithmetic encoding section 17, thereby to obtain an arithmetic codeD16.

Suppose that rate control is carried out by the rate control section 18and n (pieces of) bit planes are discarded from the least significantbit (LSB) side. This rate control is a processing equivalent to divisionof the quantization coefficient set by n-th power of 2. In other words,this processing is equivalent to quantization with a wider dead zone asshown in FIG. 8. In the present embodiment, if quantization is carriedout by the second quantization section 13 b, the rate control section 18is bypassed in order to maintain high image quality. At this time, thetotal code amount may disagree with the target code amount. However, thetotal code amount can be substantially adjusted to the target codeamount by performing quantization with an optimal quantization step sizeΔ_(b).

Then, the format section 19 adds various headers to the arithmetic codestring D17 supplied from the rate control section 18 or the arithmeticcode D16 supplied from the arithmetic encoding section 17, thereby togenerate an encoded stream D18. At this time, the format section 19makes the quantization step size (Δb or Δc) included in the headers.

Also, a predetermined parameter for determining a parameter r (0≦r<1)used in inverse quantization is included in the headers by the formatsection 19.

According to JPEG 2000 standard, a plurality of marker segments areprepared for purposes in the header, and QCD and QCC marker segments areprepared for quantization. FIG. 10 shows a table concerning Sqcd andSqcc parameters existing in the QCD and QCC marker segments. This tableis disclosed as “Table A-28” in the spec sheets of the JPEG 2000standard. In FIG. 10, undefined columns are reserved for the future. Asshown in FIG. 11, the format section 19 utilizes free three bits todescribe values of 0 to 7 as the predetermined parameter. For example,the parameter r is expressed in eight ways of 0, ⅛, 2/8, . . . ⅞. Ifquantization is carried out by the second quantization section 13 b, theparameter r is 0, and therefore, only 0 is used as the predeterminedparameter. A detailed description will be made later in this respect.

As described above, the quantization section 13 in the presentembodiment is capable of varying the image quality of a decoded image byvarying the width of the dead zone and by including the predeterminedparameter for inverse quantization in the encoded code stream D18.Particularly when high quality is required, the width of the dead zoneis narrowed to eliminate loss of details caused by quantization, andhence, subjective image quality can be improved.

In addition, the present embodiment complies with the Part-1 standardaccording to the JPEG 2000 scheme. Therefore, a decoded image of minimumnecessary quality can be obtained even when a conventionalgeneral-purpose image decoder is used in place of an image decodercorresponding to the above image encoder 10.

(2-2) Modifications

According to the present embodiment, an encoded code stream D18 isgenerated by bypassing the rate control section 18 if the secondquantization section 13 b carries out quantization, as described above.In this case, it is not always easy to adjust the total code amount tothe target code amount. Hence, for example, a code amount calculationsection 20 and a quantization step size determination section 21 mayfurther be provided, as shown in FIG. 12. Encoding may be performed withseveral different quantization step sizes, and a quantization step sizefit for the target code amount may then be selected.

More specifically, the code amount calculation section 20 obtains thecode amount of an encoded code stream D18 outputted from the formatsection 19. If the difference between the obtained code amount and thetarget code amount is not smaller than a threshold value, the codeamount calculation section 20 sends a control signal D19 to thequantization step size determination section 21. The quantization stepsize determination section 21 updates the quantization step size inaccordance with the control signal D19, and then supplies a new updatedquantization step size D20 to the second quantization section 13 b. Thesecond quantization section 13 b performs quantization with use of thequantization step size D20. Otherwise, if the difference between thecode amount of the encoded code stream D18 and the target code amount issmaller than the threshold value, the code amount calculation section 20outputs directly the code stream as an encoded code stream D21.

Thus, the total code amount can be adjusted to the target code amounteven if quantization is carried out by the second quantization section13 b and the rate control section 18 is bypassed.

(3) Configuration and Operation of the Image Decoder

FIG. 13 shows a schematic configuration of the image decoder accordingto the present embodiment. As shown in FIG. 13, the image decoder 30 isconstituted by an inverse format section 31, arithmetic decoding section33, bit de-modeling section 34, code block synthesis section 35,adaptive inverse quantization section 36, wavelet inverse transformationsection 37, and DC-level inverse shift section 38. The arithmeticdecoding section 33 and the bit de-modeling section 34 togetherconstitutes an EBCOT decoding section 32.

The inverse format section 31 is inputted with an encoded code streamD30 and decomposes this stream into various encoded information. Theinverse format section 31 then supplies the arithmetic decoder 33forming part of the EBCOT section 32 with an arithmetic code string D31for every block. Also, the inverse format section 31 supplies theadaptive inverse quantization section 36 with a quantization step size(Δ_(b) or Δ_(c)) D35 in a header, and with a predetermined parameter D36in QCD and QCC marker segments also in the header.

The arithmetic decoding section 33 arithmetically decodes the arithmeticcode string D31 to generate a symbol and a context D32 for everycoefficient bit. The bit de-modeling section 34 reconstructs binary datain units of bit planes from the symbol and context D32 for everycoefficient bit. In actual cases, the binary data is a quantizationcoefficient set D33. The bit de-modeling section 34 supplies thequantization coefficient set D33 to the code block synthesis section 35.

The code block synthesis section 35 synthesizes the quantizationcoefficient set D33 for every code block, to generate a quantizationcoefficient set D34 for every sub-band, and supplies the adaptiveinverse quantization section 36 with the quantization coefficient setD34 for every sub-band.

The adaptive inverse quantization section 36 inversely quantizes thequantization coefficient set D34 for every sub-band, which is suppliedfrom the code block synthesis section 35, to transform the coefficientset D34 into a wavelet transformation coefficient set D37. The adaptiveinverse quantization section 36 supplies the wavelet transformationcoefficient set D37 to the wavelet inverse-transformation section 37.

More specifically, when an inverse quantization processing correspondingto the first quantization section 13 a is performed, the adaptiveinverse quantization section 36 uses Δ_(c) as a quantization step sizeD35 supplied from the inverse format section 31 and a parameter robtained from the predetermined parameter D36, to obtain a wavelettransformation coefficient Rq(u, v) after inverse quantization,according to the expression (6) below.Rq(u, v)=(q(u, v)+r)×Δ_(c)  (6)

In this expression (6), Δ_(c) is a final quantization step size as aresult of rate control, as described above. Normally, 0.5 is used as theparameter r.

On the other side, when an inverse quantization processing correspondingto the second quantization section 13 b is performed, the adaptiveinverse quantization section 36 uses Δ_(b) as a quantization step sizeD35 supplied from the inverse format section 31 and a parameter robtained from the predetermined parameter D36, to obtain a wavelettransformation coefficient Rq(u, v) after inverse quantization,according to the expression (7) below.Rq(u, v)=(q(u, v)+r)×Δ_(b)  (7)

If the inverse quantization processing corresponding to the secondquantization section 13 b is thus performed, the parameter r is 0.Therefore, in actual cases, the adaptive inverse quantization section 36obtains the wavelet transformation coefficient Rq(u, v) after inversequantization, according to the expression (8) below.Rq(u, v)=q(u, v)×Δ_(b)  (8)

FIG. 14 shows a schematic configuration of the adaptive inversequantization section 36. As shown in FIG. 14, the adaptive inversequantization section 36 is constituted by a r-value determinationsection 40, adder 41, and multiplier 42. The r-value determinationsection 40 determines a parameter D40 indicating r on the basis of thepredetermined parameter D36 supplied from the inverse format section 31and supplies the adder 41 with the parameter D40. More specifically, ifthe predetermined parameter D36 is x, the r-value determination section40 takes x/8 as the parameter r. The adder 41 adds up the parameter D40and the quantization coefficient set D34 for every frame, which issupplied from the code block synthesis section 35. The adder 41 suppliesthe addition result as addition value D41 to the multiplier 42. Themultiplier 42 multiplies the addition value D41 by the quantization stepsize D35, to obtain a wavelet transformation coefficient set D37, andsupplies the coefficient set D37 to the wavelet inverse transformationsection 37.

The wavelet inverse transformation section 37 inversely transforms thewavelet transformation coefficient set D37, to generate a decoded imageD38, and supplies the decoded image D38 to the DC-level inverse shiftsection 38.

The DC-level inverse shift section 38 performs an inverse shiftprocessing on the decoded image D38 if a DC-level shift processing hasbeen effected by the image encoder 10. The DC-level inverse shiftsection 38 then outputs a final decoded image D39.

As described above, in the image decoder 30 according to the presentembodiment, inverse quantization is performed with use of apredetermined parameter D36 included in the encoded code stream D30.Therefore, it is possible to obtain a decoded image having image qualitycorresponding to the width of the dead zone at the time whenquantization was carried out.

The present invention is not limited to the embodiment described abovebut various modifications are possible without deviating from the spiritof the present invention.

For example, the embodiment described above has been described as usingx/8 as the parameter r if the predetermined parameter D36 written in theQCD and QCC maker segments in the header is x. The present invention isnot limited to this case. That is, a table for the parameter r may beprepared in the r-value determination section 40, and the predeterminedparameter D36 may express an index to this table.

1. An image decoder comprising: inverse format means which decomposesthe encoded code stream into at least an arithmetic code and apredetermined parameter, the encoded code stream having been generatedby hierarchically performing a filtering process on an input image togenerate a plurality of sub-bands, quantizing, with a quantizationmeans, coefficients in each sub-band, dividing the sub-bands, togenerate a plurality of code blocks each having a predetermined size,generating, for each code block, bit planes from a most significant bitto a least significant bit, generating the arithmetic code byarithmetically encoding a coding pass generated for each bit plane; andadding, with a format means, a header to the arithmetic code to generatean encoded code stream, wherein the quantization means sets, in responseonly to a selected image quality level, a corresponding width of a deadzone, the dead zone being a quantization zone where the coefficients arequantized to a value of 0, and the format means sets the predeterminedparameter included in the header; decoding means which decodes thearithmetic code; encoded-pass decoding means which reconstructs the bitplanes from the most significant bit to the least significant bit bydecoding the encoded coding pass for each bit plane; code blockreconstruction means which reconstructs the code blocks, based on thebit planes from the most significant bit to the least significant bit;sub-band generation means which collects the code blocks to generate thesub-bands; inverse quantization means which inversely quantizes aplurality of quantization coefficients for each sub-band, with use ofthe predetermined parameter; and filtering means which hierarchicallyperforms a filtering process on the sub-bands, to reconstruct the inputimage, wherein the inverse quantization means adds the predeterminedparameter to each of the quantization coefficients for every one of thesub-bands, and multiplies each of the addition results thereof by aquantization step size, to inversely quantize the quantizationcoefficients for each sub-band.
 2. The image decoder according to claim1, wherein in the quantization, a first quantization processing in whichthe width of the dead zone is relatively wide or a second quantizationprocessing in which the width of the dead zone is relatively narrow canbe selected in correspondence with the required image quality, in thefirst quantization processing, each of the coefficients in each of thesub-bands is divided by a quantization step size assigned to thesub-band to which the coefficient being divided belongs, and thereafter,a fraction thereof is rounded down, in the second quantizationprocessing, each of the coefficients in each of the sub-bands is dividedby a quantization step size assigned to the sub-band to which thecoefficient being divided belongs, and the dividing result is added with0.5, and thereafter, a fraction thereof is rounded down, and the inversequantization means adds r (0≦r<1) as the predetermined parameter if thefirst quantization processing has been performed, or adds 0 as thepredetermined parameter if the second quantization processing has beenperformed.
 3. The image decoder according to claim 2, wherein theinverse quantization means adds 0.5 as the predetermined parameter ifthe first quantization processing has been performed.